diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php
index 124967a..2811d88 100644
--- a/system/database/DB_utility.php
+++ b/system/database/DB_utility.php
@@ -25,20 +25,20 @@
 class CI_DB_utility extends CI_DB_forge {
 
 	var $db;
-	var $data_cache 	= array();
+	var $data_cache		= array();
 
 	/**
 	 * Constructor
 	 *
 	 * Grabs the CI super object instance so we can access it.
 	 *
-	 */	
+	 */
 	function CI_DB_utility()
 	{
 		// Assign the main database object to $this->db
 		$CI =& get_instance();
 		$this->db =& $CI->db;
-		
+
 		log_message('debug', "Database Utility Class Initialized");
 	}
 
@@ -51,13 +51,13 @@
 	 * @return	bool
 	 */
 	function list_databases()
-	{	
+	{
 		// Is there a cached result?
 		if (isset($this->data_cache['db_names']))
 		{
 			return $this->data_cache['db_names'];
 		}
-	
+
 		$query = $this->db->query($this->_list_databases());
 		$dbs = array();
 		if ($query->num_rows() > 0)
@@ -67,7 +67,7 @@
 				$dbs[] = current($row);
 			}
 		}
-			
+
 		$this->data_cache['db_names'] = $dbs;
 		return $this->data_cache['db_names'];
 	}
@@ -109,15 +109,15 @@
 	function optimize_table($table_name)
 	{
 		$sql = $this->_optimize_table($table_name);
-		
+
 		if (is_bool($sql))
 		{
 				show_error('db_must_use_set');
 		}
-	
+
 		$query = $this->db->query($sql);
 		$res = $query->result_array();
-		
+
 		// Note: Due to a bug in current() that affects some versions
 		// of PHP we can not pass function call directly into it
 		return current($res);
@@ -137,14 +137,14 @@
 		foreach ($this->db->list_tables() as $table_name)
 		{
 			$sql = $this->_optimize_table($table_name);
-			
+
 			if (is_bool($sql))
 			{
 				return $sql;
 			}
-			
+
 			$query = $this->db->query($sql);
-			
+
 			// Build the result array...
 			// Note: Due to a bug in current() that affects some versions
 			// of PHP we can not pass function call directly into it
@@ -153,7 +153,7 @@
 			$key = str_replace($this->db->database.'.', '', current($res));
 			$keys = array_keys($res);
 			unset($res[$keys[0]]);
-			
+
 			$result[$key] = $res;
 		}
 
@@ -172,20 +172,20 @@
 	function repair_table($table_name)
 	{
 		$sql = $this->_repair_table($table_name);
-		
+
 		if (is_bool($sql))
 		{
 			return $sql;
 		}
-	
+
 		$query = $this->db->query($sql);
-		
+
 		// Note: Due to a bug in current() that affects some versions
 		// of PHP we can not pass function call directly into it
 		$res = $query->result_array();
 		return current($res);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -203,25 +203,25 @@
 		if ( ! is_object($query) OR ! method_exists($query, 'list_fields'))
 		{
 			show_error('You must submit a valid result object');
-		}	
-	
+		}
+
 		$out = '';
-		
+
 		// First generate the headings from the table column names
 		foreach ($query->list_fields() as $name)
 		{
 			$out .= $enclosure.str_replace($enclosure, $enclosure.$enclosure, $name).$enclosure.$delim;
 		}
-		
+
 		$out = rtrim($out);
 		$out .= $newline;
-		
+
 		// Next blast through the result array and build out the rows
 		foreach ($query->result_array() as $row)
 		{
 			foreach ($row as $item)
 			{
-				$out .= $enclosure.str_replace($enclosure, $enclosure.$enclosure, $item).$enclosure.$delim;			
+				$out .= $enclosure.str_replace($enclosure, $enclosure.$enclosure, $item).$enclosure.$delim;
 			}
 			$out = rtrim($out);
 			$out .= $newline;
@@ -229,7 +229,7 @@
 
 		return $out;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -246,7 +246,7 @@
 		{
 			show_error('You must submit a valid result object');
 		}
-		
+
 		// Set our default values
 		foreach (array('root' => 'root', 'element' => 'element', 'newline' => "\n", 'tab' => "\t") as $key => $val)
 		{
@@ -255,10 +255,10 @@
 				$params[$key] = $val;
 			}
 		}
-		
+
 		// Create variables for convenience
 		extract($params);
-			
+
 		// Load the xml helper
 		$CI =& get_instance();
 		$CI->load->helper('xml');
@@ -268,7 +268,7 @@
 		foreach ($query->result_array() as $row)
 		{
 			$xml .= $tab."<{$element}>".$newline;
-			
+
 			foreach ($row as $key => $val)
 			{
 				$xml .= $tab.$tab."<{$key}>".xml_convert($val)."</{$key}>".$newline;
@@ -276,7 +276,7 @@
 			$xml .= $tab."</{$element}>".$newline;
 		}
 		$xml .= "</$root>".$newline;
-		
+
 		return $xml;
 	}
 
@@ -297,9 +297,9 @@
 		{
 			$params = array('tables' => $params);
 		}
-		
+
 		// ------------------------------------------------------
-	
+
 		// Set up our default preferences
 		$prefs = array(
 							'tables'		=> array(),
@@ -325,13 +325,13 @@
 
 		// ------------------------------------------------------
 
-		// Are we backing up a complete database or individual tables?	
+		// Are we backing up a complete database or individual tables?
 		// If no table names were submitted we'll fetch the entire table list
 		if (count($prefs['tables']) == 0)
 		{
 			$prefs['tables'] = $this->db->list_tables();
 		}
-		
+
 		// ------------------------------------------------------
 
 		// Validate the format
@@ -345,13 +345,13 @@
 		// Is the encoder supported?  If not, we'll either issue an
 		// error or use plain text depending on the debug settings
 		if (($prefs['format'] == 'gzip' AND ! @function_exists('gzencode'))
-		 OR ($prefs['format'] == 'zip'  AND ! @function_exists('gzcompress')))
+		OR ($prefs['format'] == 'zip'  AND ! @function_exists('gzcompress')))
 		{
 			if ($this->db->db_debug)
 			{
 				return $this->db->display_error('db_unsuported_compression');
 			}
-		
+
 			$prefs['format'] = 'txt';
 		}
 
@@ -365,7 +365,7 @@
 		}
 
 		// ------------------------------------------------------
-				
+
 		// Was a Gzip file requested?
 		if ($prefs['format'] == 'gzip')
 		{
@@ -373,7 +373,7 @@
 		}
 
 		// ------------------------------------------------------
-		
+
 		// Was a text file requested?
 		if ($prefs['format'] == 'txt')
 		{
@@ -382,7 +382,7 @@
 
 		// ------------------------------------------------------
 
-		// Was a Zip file requested?		
+		// Was a Zip file requested?
 		if ($prefs['format'] == 'zip')
 		{
 			// If they included the .zip file extension we'll remove it
@@ -390,7 +390,7 @@
 			{
 				$prefs['filename'] = str_replace('.zip', '', $prefs['filename']);
 			}
-			
+
 			// Tack on the ".sql" file extension if needed
 			if ( ! preg_match("|.+?\.sql$|", $prefs['filename']))
 			{
@@ -398,13 +398,13 @@
 			}
 
 			// Load the Zip class and output it
-			
+
 			$CI =& get_instance();
 			$CI->load->library('zip');
-			$CI->zip->add_data($prefs['filename'], $this->_backup($prefs));							
+			$CI->zip->add_data($prefs['filename'], $this->_backup($prefs));
 			return $CI->zip->get_zip();
 		}
-		
+
 	}
 
 }
